package com.ogawa.joypal.user.service
import com.ogawa.base.base.BaseResponseBean
import com.ogawa.joypal.user.bean.*
import retrofit2.http.*

interface UserApiService {

        /**
         * 获取验证码
         */
        @GET("/api/uac/v1/user/captcha")
        suspend fun smsLogin(
                @Query("countryCode")countryCode:String,
                @Query("mobile")mobile:String,
                @Query("platform")platform:String,
                @Query("type")type:String
        ): BaseResponseBean<UsercaptchaBean>

        /**
         * 校验验证码
         * captcha      验证码
         */
        @GET("/api/uac/v1/user/verifyCaptcha")
        suspend fun verifyCaptcha(
                @Query("mobile")mobile:String,
                @Query("captcha")captcha:String,
                @Query("type")type:String
        ): BaseResponseBean<VerifyCaptchaBean>
        /**
         * 用户登录
         */
        @POST("/api/uac/v1/user/login")
        suspend fun userLogin(@Body request : UserLoginRequest): BaseResponseBean<UserloginBean>

        /**
         * 用户详情信息
         */
        @GET("/api/uac/v1/userInfos/{id}")
        suspend fun userInfo(@Path("id") id : String): BaseResponseBean<UserInfosBean>

        /**
         * 用户信息编辑
         */
        @PUT("/api/uac/v1/userInfos")
        suspend fun putUserInfo(@Body request: PutUserInfoRequest): BaseResponseBean<PutUserInfosResponse>

        /**
         * 意见反馈
         */
        @POST("/api/app/v1/feedbacks")
        suspend fun userFeedBacks(@Body request: UserFeedBacksRequest): BaseResponseBean<UserFeedBacksRequest>

}